#!/usr/bin/python
# -*- coding: UTF-8 -*-

str1 = '{0} love {1}.{2}'
s = str1.format('I', 'mON', '.com')
print('s', s);

str1 = '{a} love {b}.{c}'
s = str1.format(a = 'I', b = 'mON', c = '.com')
print('s', s);

str1 = '{a} love {b}.{c}'
s = str1.format(a = 'I', b = 'mON', c = '.com')
print('s', s);

str2 = '\ta'
print('str2', str2)
str2 = '\\'
print('str2', str2)

str2 = '{{0}}'
str2 = str2.format('不打印')
print('str2', str2)

str2 = '{0:.1f}{1}'
str2 = str2.format(27.658, 'GB')
print('str2', str2)

str = '%c %c %c' % (97, 98, 99)
print(str)

str = '%d %d %d' % (4, 5, 4 + 5)
print(str)

str = '%o' % 10
print(str)

str = '%x' % 10
print(str)

str = '%X' % 10
print(str)

str = '%f' % 27.658
print(str)

str = '%e' % 27.658
print(str)

str = '%E' % 27.658
print(str)

str = '%g' % 27.658
print(str)

str = '%5.1f' % 27.658
print(str)

str = '%.2e' % 27.658
print(str)

str = '%10d' % 5
print(str)

str = '%-10d' % 5
print(str)

str = '%+d' % 5
print(str)

str = '%+d' % -5
print(str)

str = '%#o' % 10
print(str)

str = '%#X' % 10
print(str)

str = '%#X' % 108
print(str)

str = '%#d' % 10
print(str)

str = '%010d' % 5
print(str)

str = '%-010d' % 5
print(str)


